package com.xhs.main.service.rsb.impl;

import com.xhs.main.dao.rsb.RsbAttendanceDao;
import com.xhs.main.entity.rsb.RsbAttendance;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author author
 * @create 2020-10-25-13:19
 */
@Service
public class RsbAttendanceServiceImpl implements RsbAttendanceDao {

    @Autowired
    RsbAttendanceDao rsbAttendanceDao;


    @Override
    public void insertAttendance(RsbAttendance rsbAttendance) {
        rsbAttendanceDao.insertAttendance(rsbAttendance);
    }

    @Override
    public void deleteAttendance(String rsbAtNum) {
        rsbAttendanceDao.deleteAttendance(rsbAtNum);
    }

    @Override
    public void updateAttendance(String rsbAtNum, int rsbAtAddtimes) {
        rsbAttendanceDao.updateAttendance(rsbAtNum,rsbAtAddtimes);
    }

    @Override
    public void updateAttendance2(String rsbAtNum, int rsbAtTrueday, int rsbAtFalseday) {
        rsbAttendanceDao.updateAttendance2(rsbAtNum,rsbAtTrueday,rsbAtFalseday);
    }

    @Override
    public RsbAttendance selectByAtId(String rsbAtNum) {
        RsbAttendance rsbAttendance = rsbAttendanceDao.selectByAtId(rsbAtNum);
        return rsbAttendance;
    }

    @Override
    public List<RsbAttendance> selectAll() {
        List<RsbAttendance> rsbAttendances = rsbAttendanceDao.selectAll();
        return rsbAttendances;
    }
}
